Microsoft Teams

This section describes how to deploy your AI Agent in Microsoft Teams.

Prerequisites

Before configuring the MS Teams channel, ensure you have:

  • A published AI Agent.
  • A MS Teams account.
  • Microsoft Bot Framework enabled on your tenant (for Druid hybrid and cloud deployments).

IMPORTANT!
  • For DRUID hybrid and cloud deployments, the MS Teams channel requires the Microsoft Bot Framework. You can configure the channel only if the Bot Framework is enabled on your tenant. If the channel configuration is unavailable – the Post Office is set to BotService (AI Agent Details → General) – contact Druid Support to enable the Microsoft Bot Framework on your tenant.
  • MS Teams channel integration is not available for Druid on-premise deployments.
HINT: The MS Teams channel supports sensitive data input. For more information, see Prompt Steps.

Deploy your AI Agent in MS Teams

This section describes how to deploy AI Agents in a team with MS Teams using the Developer Portal. For information on other options you’ve got for MS Teams integration, see Microsoft documentation.

Step 1. Active MS Teams channel in Druid

  1. Log in to the Druid Portal and select your AI Agent.
  2. Click the Channels tab.
  3. Search for 'teams' and click the MS Teams card.
  4. The channel configuration modal appears.
  5. Select the Microsoft Teams option that suits your company's Microsoft Office 365 version, agree to the Microsoft terms and statements and click Publish.
  6. The channel activation might take up to 1 minute.

    When the channel activation completes, the Microsoft Application Id field is automatically filled in. This is the MS Azure ID associated to your AI Agent.

  7. Copy the Microsoft Application Id as you will need the value at the next step.

After the channel activates, Druid automatically provisions the following [[ChatUser]] parameters in the conversation context:

  • [[ChatUser]].ChannelId = "msteams"
  • [[ChatUser]].UserId - Stores an unique identifier of the MS Teams user account.
  • [[ChatUser].Email
  • [[ChatUser].FirstName
  • [[ChatUser].Lastname
  • [[ChatUser].DomainUserName

Step 2. Create a AI Agent using Developer Portal and download the app package

  1. In the Teams client, open the Developer Portal. From the ... overflow menu on the left, click Developer Portal.
  2. The Teams Developer Portal opens.

    If Developer Portal isn't already installed, install it:

    1. Search for Developer Portal.
    2. Click on Developer Portal.
    3. The app is now available when clicking … on the left menu.

  3. Click the Apps tab, then click New App.
  4. Type a name for your app and click Create.
  5. On the Configure menu, click Basic Information.
  6. Provide your app details.
  7. In the Microsoft Partner ID field, enter the DRUID MPN (the one generated in Druid after the channel activation).

  8. Click Save.
  9. On the Configure menu, click Permissions and under Device Permissions, select Send the user notifications.
  10. Click Save.
  11. From the Configure menu, click App features and on the right pane, click AI Agent.
  12. Tap on Enter an AI Agent ID and in the field below enter the Microsoft Application ID associated to your AI Agent (the one generated in Druid after the channel activation).
  13. HINT: Copy and Paste the Microsoft Application Id from the Teams channel configuration from the Druid Portal.

  14. Select the capabilities and scopes your AI Agent will need: Upload and download files, scopes Personal and Team.
  15. Scroll down and click Save.
  16. If you want your AI Agent to benefit the sensitive data manipulation:
    1. On the Configure menu, click Domains.
    2. Add the following domains:
      • token.botframework.com
      • Druid API domain that is specific to the Druid Cloud you're using:
      • DRUID Community PROD Europe PROD US PROD Australia
        druidapi.comm.eu.druidplatform.com prod-DRUID-api.azurewebsites.net druidapi.us.druidplatform.com druidapi.au.druidplatform.com
  17. At the top right corner of the page, click the Distribute button. A pop-up appears.
  18. Click Download the app package.

The app package is successfully downloaded in your default download folder.

Step 3. Validate your app

To validate your app, follow these steps:

  1. From the Publish menu, click App validation.
  2. In the App Validation page, click Get Started.
  3. Acknowledge the three steps on the screen and click Start validation.

When the app validation completes successfully, you can publish the app to your org, publish to the Teams store or install it in MS Teams.

Step 4. Install the AI Agent in a team in MS Teams

NOTE: You must be the owner of the MS Team in order to install the AI Agent.
IMPORTANT!

The AI Agent installation in MS Teams is done progressively (not instantly); so it might take up to 48 hours for the installation to complete depending on how many MS Team members you have.

During the AI Agent installation, the AI Agent appears to your Team members on the left menu and sends them the welcome message set on the AI Agent. If you want to prevent the AI Agent from sending the welcome message until its installation in MS Teams completes, temporarily disable the Welcome flow (in Druid Portal, go to the AI Agent details, section Dialogue management and leave the Welcome flow field empty).

To integrate the AI Agent in a MS team, in MS teams, from the left menu, click Teams. Right click on a team that you created and select Manage team.

The Team page appears by default on the Members tab.

Click the Apps tab, then click Upload an app.

Browse for the app package you downloaded at Step 2, select it and click Open. If the Microsoft manifest passed, the AI Agent installation starts in the selected team.

Implement Role-Based Access Control via Microsoft Entra ID Groups

By default, Druid retrieves the user's name, surname, and email from Microsoft Teams. Starting with Druid 9.19, you can also retrieve the security groups the user belongs to. This allows you to create specialized flows based on user roles—for example, granting "Operational" users access to internal invoicing tools while keeping other users in an "Informational" only loop.

Step 1. Create an App in Microsoft Entra ID

To enable group retrieval, you must register a separate application in the Microsoft Entra admin center (formerly Azure Active Directory) to grant Druid permission to read directory data.

  1. Register a new application following Microsoft documentation.
  2. Ensure the application has the API Permission: GroupMember.Read.All (Application permission).
  3. Generate a Client Secret for this application.
  4. Copy the Client ID, Client Secret, and Tenant ID.

Step 2. Configure the MS Teams Channel in Druid

Navigate to your MS Teams channel configuration in the Druid Portal and provide the details from the Entra ID app:

  • Directory access Client Id
  • Directory access Client Secret
  • Directory access Tenant Id

Step 3. How Group Data is Stored

Once configured and the channel is active, the groups associated with the user are automatically stored in the conversation context. The data is saved in a JArray format within the following system parameter: [[ChatUser]].SSOGroups.

Example data stored in this parameter: ["HR", "Financial", "Managers", "Invoicing_Team"]

You can use this parameter, [[ChatUser]].SSOGroups within your flows to branch logic. For instance, an AI Agent can check if [[ChatUser]].SSOGroups contains "Financial" before allowing a user to download invoices.

Limitations

MS Teams has a limited pagination for hero cards and buttons with repeater, as follows:

  • For hero buttons with repeater, a bulk of 6 will be shown per page.
  • For hero cards with repeater, a bulk of 9 will be shown per page.

Inactivating the channel

To inactivate the channel, go to the Channels page and turn off the Enabled toggle on the MS Teams card.